﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UI
{
   public static class datetimeClass
    {
       static DateTime now=DateTime.Now;
       public static DateTime 年头 = new DateTime(now.Year, 1, 1, 0, 0, 0);
       public static DateTime 年尾 = 年头.AddYears(1).AddSeconds(-1);
       public static DateTime 月头 = new DateTime(now.Year, now.Month, 1, 0, 0, 0);
       public static DateTime 月尾 = 月头.AddMonths(1).AddSeconds(-1);
       public static DateTime get月头(int month)
       {
           return new DateTime(now.Year, month, 1, 0, 0, 0);
       }

       public static DateTime get月尾(int month)
       {
           return get月头(month).AddMonths(1).AddSeconds(-1);
       }
    }
}
